package com.lam.schedule.common.constant;

public class ScheduleConstant {
	
	/** quartzJob放置任务数据的key */
	public static final String JOB_DATA_KEY = "taskJob";
	/** 执行任务的参数key */
	public static final String JOB_PARAM_KEY = "taskJobParam";
	/** 当前执行日志参数key */
	public static final String CUR_EXE_LOG = "curExeLog";
	
	/** 默认的任务分组 */
	public static final String DEFAULT_GROUP = "Dedault";
	/** 定时器触发任务时的操作人 */
	public static final String TRIGGER_USER = "Timer";
	
	/** 触发方式 1-定时器触发 */
	public static final Integer TRIGGER_TYPE_TIMER = 1;
	/** 触发方式  2-手动触发 */
	public static final Integer TRIGGER_TYPE_MANUAL = 2;
	/** 触发方式 3-程序调用  */
	public static final Integer TRIGGER_TYPE_PRO_INVOKE = 3;
	
	/** 任务启用状态 1正常 */
	public static final Integer JOB_STATUS_YES = 1;
	/** 任务启用状态 0暂停 */
	public static final Integer JOB_STATUS_NO = 0;
	
	/** 执行结果  1成功 */
	public static final Integer EXE_STATUS_SUCCESS = 1;
	/** 执行结果 0失败 */
	public static final Integer EXE_STATUS_FAIL = 0;
	/** 执行结果 2正在执行 */
	public static final Integer EXE_STATUS_GOING = 2;
	
	/** 并发类型(1-允许并发 ) */
	public static final Integer CONCURRENT_TYPE_Y = 1;
	/** 并发类型(0-串行执行) */
	public static final Integer CONCURRENT_TYPE_N = 0;
	
	/** 存放目标执行类的Redis key名 */
	public static final String TARGET_CLASS_KEY = "schedule:task:targetClass:";
	
	/** 调度状态 NONE ：Trigger已经完成，且不会在执行，或者找不到该触发器，或者Trigger已经被删除  
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_NONE = "NONE";
	/** 调度状态 NORMAL:正常   
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_NORMAL = "NORMAL";
	/** 调度状态 WAITING:等待执行   
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_WAITING = "WAITING";
	/** 调度状态 ACQUIRED:即将执行   
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_ACQUIRED = "ACQUIRED";
	/** 调度状态 EXECUTING:正在执行   
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_EXECUTING = "EXECUTING";
	/** 调度状态 RUNNING:正在异步执行 */
	public static final String SH_STATUS_RUNNING = "RUNNING";
	/** 调度状态 PAUSED：暂停  
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_PAUSED = "PAUSED";
	/** 调度状态 COMPLETE：触发完成，但是任务可能还正在执行中   
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_COMPLETE = "COMPLETE";
	/** 调度状态 BLOCKED：线程阻塞  
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_BLOCKED = "BLOCKED";
	/** 调度状态 PAUSED_BLOCKED：暂停阻塞  
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_PAUSED_BLOCKED = "PAUSED_BLOCKED";
	/** 调度状态 ERROR：出现错误  
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_ERROR = "ERROR";
	/** 调度状态 DELETED：已删除  
	 * <br>详情查看 <code>{@link org.quartz.impl.jdbcjobstore.Constants}</code> */
	public static final String SH_STATUS_DELETED = "DELETED";
	
	
	/** 表唯一配置，定时任务表(schedule_job) - job_name 字段 */
	public static final String UNIQUE_JOB_NAME = "scheduleJobName";

}
